package com.yict.csms.resourceplan.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * 
 * @author tortoi.huang
 * 
 */
@Entity
@Table(name = "CSMS_RTGC_FL_WHART_NEED")
public class RtgcFlWhartNeed {

	@Id
	@Column(name = "NEEDID")
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "csms_rtgc_fl_whart_need_seq")
	@SequenceGenerator(name = "csms_rtgc_fl_whart_need_seq", sequenceName = "SEQ_CSMS_RTGC_FL_WHART_NEED", allocationSize = 1, initialValue = 1)
	private Long needid;

	@ManyToOne
	@JoinColumn(name = "TIMEID")
	private RtgcFlTime rtgcFlTime;

	@Column(name = "FORSEGMENT")
	private String forsegment;

	@Column(name = "QUANTITY")
	private Double quantity;

	@Column(name = "ESTIMATEQUAN")
	private Double estimatequan;

	@Column(name = "ESTIMATEJQUAN")
	private Double estimatejquan;

	@Column(name = "ESTIMATEZQUAN")
	private Double estimatezquan;

	@Column(name = "CREATEPERSON")
	private Long createperson;

	@Column(name = "CREATEDATE")
	private Date createdate;

	@Column(name = "UPDATEPERSON")
	private Long updateperson;

	@Column(name = "UPDATEDATE")
	private Date updatedate;

	public Long getNeedid() {
		return needid;
	}

	public void setNeedid(Long needid) {
		this.needid = needid;
	}

	public RtgcFlTime getRtgcFlTime() {
		return rtgcFlTime;
	}

	public void setRtgcFlTime(RtgcFlTime rtgcFlTime) {
		this.rtgcFlTime = rtgcFlTime;
	}

	public String getForsegment() {
		return forsegment;
	}

	public void setForsegment(String forsegment) {
		this.forsegment = forsegment;
	}

	public Double getQuantity() {
		if(quantity==null ||quantity.equals(""))
			quantity=0.0;
		return quantity;
	}

	public void setQuantity(Double quantity) {
		this.quantity = quantity;
	}

	public Double getEstimatequan() {
		if(estimatequan==null ||estimatequan.equals(""))
			estimatequan=0.0;
		return estimatequan;
	}

	public void setEstimatequan(Double estimatequan) {
		this.estimatequan = estimatequan;
	}

	public Double getEstimatejquan() {
		if(estimatejquan==null ||estimatejquan.equals(""))
			estimatejquan=0.0;
		return estimatejquan;
	}

	public void setEstimatejquan(Double estimatejquan) {
		this.estimatejquan = estimatejquan;
	}

	public Double getEstimatezquan() {
		if(estimatezquan==null ||estimatezquan.equals(""))
			estimatezquan=0.0;
		return estimatezquan;
	}

	public void setEstimatezquan(Double estimatezquan) {
		this.estimatezquan = estimatezquan;
	}

	public Long getCreateperson() {
		return createperson;
	}

	public void setCreateperson(Long createperson) {
		this.createperson = createperson;
	}

	public Date getCreatedate() {
		return createdate;
	}

	public void setCreatedate(Date createdate) {
		this.createdate = createdate;
	}

	public Long getUpdateperson() {
		return updateperson;
	}

	public void setUpdateperson(Long updateperson) {
		this.updateperson = updateperson;
	}

	public Date getUpdatedate() {
		return updatedate;
	}

	public void setUpdatedate(Date updatedate) {
		this.updatedate = updatedate;
	}
}
